﻿namespace IOLib
{
    public class IOFactory
    {
        public static string[] IOProduct = new string[] { "FY4400", "MOXA", "PCI1847","PCI1840","S7PLC" };

        public static InterfaceIO getInstance(string product)
        {
            switch (product)
            {
                case "FY4400":
                    {
                        return new FY4400IO();
                    }
                case "MOXA":
                    {
                        return new MOXAIO();
                    }
                case "PCI1847":
                    {
                        return new PCI1847IO();
                    }
                case "PCI1840":
                    {
                        return new PCI1840IO();
                    }
                    case "S7PLC":
                    {
                        return new S7PLC();
                    }
                   
                default:
                    {
                        return null;
                    }
            }
        }
    }
}
